<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { routes } from '@/router'
</script>

<template>
  <header>
    <div class="wrapper">
      <nav>
        <RouterLink v-for="(item, index) in routes" :key="index" :to="item.path">
          {{ index + 1 }}. {{ item.name }}
        </RouterLink>
      </nav>
    </div>
  </header>

  <RouterView />
</template>

<style scoped>
header {
  line-height: 1.5;
  max-height: 100vh;
  border-right: 1px solid rgba(243, 166, 148, 0.3);
}

nav {
  width: 100%;
  font-size: 12px;
  text-align: center;
}

nav a.router-link-exact-active {
  color: hsla(160, 100%, 37%, 1);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    padding-right: calc(var(--section-gap) / 2);
  }

  nav {
    text-align: left;
    font-size: 1rem;
    padding: 1rem 0;
  }
}
</style>
